package com.aaa.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RestController
@RequestMapping("login")
public class LoginController {
    @Autowired
    private HttpSession session;


    @GetMapping
    public  String login(){
        session.setAttribute("user","admin");
        return "成功";
    }
}
